1. Technical Field
This invention relates to data base management systems, and more particularly to the referential integrity of data in such systems.
2. Description of the Prior Art
A data base management system is a computer system for recording and maintaining data. In a relational data base management system, data is stored in "tables" which can be pictured as having horizontal rows and vertical columns. Each row in an employee table, for example, would represent information about one employee. Each column of that row would represent a different attribute of the employee--the employee's name, address, department, etc. The Database 2 product of the International Business Machines Corporation (IBM) is a good example of a typical relational data base management system.
A characteristic of data stored in relational tables is whether or not the data possesses "referential integrity". Referential integrity refers to the logical consistency of stored data. For example, in a data base consisting of an employee table and a department table, the data would lack referential integrity if an employee was recorded as belonging to a department that did not exist in the department table. This requirement upon the data is called a "referential constraint", and constrains the value of departments in the employee table to those values that appear in the department table. The values that appear in the department table are unconstrained. Constrained values are termed "foreign keys". Unconstrained values are termed "primary keys".
A goal of relational data base management systems is to ensure the referential integrity of the data placed into the tables it manages. This is known as referential constraint enforcement. The prior art teaches the enforcement of referential constraints on a statement-by-statement or a transaction-by-transaction basis (transactions comprising one or more statements). In these methods, the constraints are enforced in the same order as the data base records are "manipulated", e.g., added (inserted), updated (changed), deleted, etc. In large-scale data base operations which manipulate many records, the prior art methods are unable to reorganize the order in which the constraints are enforced, and therefore perform very inefficiently.